package com.atgm.mall.gmmailproduct.service.impl;

import com.atgm.mall.gmmailproduct.dao.GameUpdateDao;
import com.atgm.mall.gmmailproduct.entity.GameUpdateEntity;
import com.atgm.mall.gmmailproduct.service.GameUpdateService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

@Slf4j
@Service
public class GameUpdateServiceImpl extends ServiceImpl<GameUpdateDao, GameUpdateEntity> implements GameUpdateService {

    @Override
    public List<GameUpdateEntity> queryGameUpdateInfoByGameId(Long gameId) {
        QueryWrapper<GameUpdateEntity> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("game_id", gameId);
        queryWrapper.orderByDesc("create_time");
        List<GameUpdateEntity> list = baseMapper.selectList(queryWrapper);
        return list;
    }
}
